﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;

namespace WindowsNCtoWms
{
    public static class SqlSugarHelp
    {
        //private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();

        public static SqlSugarScope scope = new SqlSugarScope(new List<ConnectionConfig>() {
        new ConnectionConfig()
        {
            ConfigId="panhuadb",
            ConnectionString = "Data Source=175.6.36.157,40808;DataBase=panhuadb;uid=panhuadbuser;pwd=2VJLQb2JXEQqNPuWvhJs4l2kPHfFz3tu",//连接符字串
            DbType = DbType.SqlServer,//数据库类型
            IsAutoCloseConnection = true //不设成true要手动close
        },
         new ConnectionConfig()
        {
            ConfigId="yydb",
            ConnectionString = "Data Source=175.6.36.157,40808;DataBase=yydb;uid=panhuadbuser;pwd=2VJLQb2JXEQqNPuWvhJs4l2kPHfFz3tu",//连接符字串
            DbType = DbType.SqlServer,//数据库类型
            IsAutoCloseConnection = true //不设成true要手动close
        },
          new ConnectionConfig()
        {
            ConfigId="zjgdb",
            ConnectionString = "Data Source=175.6.36.157,40808;DataBase=zjgdb;uid=panhuadbuser;pwd=2VJLQb2JXEQqNPuWvhJs4l2kPHfFz3tu",//连接符字串
            DbType = DbType.SqlServer,//数据库类型
            IsAutoCloseConnection = true //不设成true要手动close
        },
            new ConnectionConfig()
        {
            ConfigId="招采",
            ConnectionString = "Data Source=113.219.212.5,10010;Initial Catalog=DASContract;Persist Security Info=True;User ID=nc;Password=nc123456;Connect Timeout=500;",//连接符字串
            DbType = DbType.SqlServer,//数据库类型
            IsAutoCloseConnection = true //不设成true要手动close
        }
        }
           );

        //public static SqlSugarScope SQLscope = new SqlSugarScope(new ConnectionConfig()
        //{
        //    ConnectionString = "Data Source=www.keyijia.net;Initial Catalog=echu;User ID=sa;Password=123;Pooling=true;MAX Pool Size=20;Min Pool Size=10;Connection Lifetime=15",//连接符字串
        //    ConnectionString = ConfigurationManager.ConnectionStrings["ecsh"].ConnectionString,//连接符字串,//连接符字串
        //    DbType = DbType.SqlServer,//数据库类型
        //    IsAutoCloseConnection = true //不设成true要手动close
        //});
    }
}
